package com.yida.gwj.expend.outside.domain.message;

import java.time.LocalDateTime;

import com.yida.common.core.exception.ServiceException;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 预受理二次审核信息
 *
 * @author liangp
 * @date 2023-02-08
 */

@ApiModel(description = "预受理审核信息")
public class PreAcceptExamineMessage {

    @ApiModelProperty(value = "外部业务标识")
    private String serverIdentification;

    @ApiModelProperty(value = "外部业务标识")
    private String outServerIdentification;

    @ApiModelProperty(value = "受理开始时间")
    private LocalDateTime acceptTime;

    @ApiModelProperty(value = "审批意见")
    private String content;

    @ApiModelProperty(value = "办理人员ID")
    private Long operId;

    @ApiModelProperty(value = "办理人员姓名")
    private String operName;

    public String getServerIdentification() {
        return serverIdentification;
    }

    public void setServerIdentification(String serverIdentification) {
        this.serverIdentification = serverIdentification;
    }

    public String getOutServerIdentification() {
        return outServerIdentification;
    }

    public void setOutServerIdentification(String outServerIdentification) {
        this.outServerIdentification = outServerIdentification;
    }

    public LocalDateTime getAcceptTime() {
        return acceptTime;
    }

    public void setAcceptTime(LocalDateTime acceptTime) {
        this.acceptTime = acceptTime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getOperId() {
        return operId;
    }

    public void setOperId(Long operId) {
        this.operId = operId;
    }

    public String getOperName() {
        return operName;
    }

    public void setOperName(String operName) {
        this.operName = operName;
    }

    public void checkNull() {
        if (StrUtil.isBlank(serverIdentification)) {
            throw new ServiceException("serverIdentification为空");
        }
        if (StrUtil.isBlank(outServerIdentification)) {
            throw new ServiceException("outServerIdentification为空");
        }
        if (ObjectUtil.isNull(acceptTime)) {
            throw new ServiceException("acceptTime为空");
        }
        if (ObjectUtil.isNull(operId)) {
            throw new ServiceException("operId为空");
        }
        if (StrUtil.isBlank(operName)) {
            throw new ServiceException("operName为空");
        }

    }
}
